﻿<phone:PhoneApplicationPage 
    x:Class="ActivityTracker.ActivityAndScheduleSelection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:my="clr-namespace:Microsoft.Advertising.Mobile.UI;assembly=Microsoft.Advertising.Mobile.UI"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:ActivityTracker"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="728"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False"
    Loaded="PhoneApplicationPage_Loaded"
    local:TiltEffect.IsTiltEnabled="True" >
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"  Background="{StaticResource bipivot}">
        <!--Pivot Control-->
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <controls:Pivot x:Name="Pivot1" Grid.Row="0" Title="ACTIVITY TRACKER - START ACTIVITY"  Foreground="White">
            <!--Pivot item one-->
            <controls:PivotItem Header="my activities" Foreground="White">
                <Grid>

                    <ListBox x:Name="lbxActivities" Grid.Row="0" Margin="12,0,12,0" SelectionChanged="lbxActivities_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Border Height="100" Width="450">
                                    <StackPanel Height="90" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
                                        <Image x:Name="ActivityImage" Width="50" Height="50" Source="{Binding ActImageSrc}" VerticalAlignment="Top"/>
                                        <TextBlock Margin="10,0,0,0" Width="390" x:Name="ActivityTextBlock" Text="{Binding ActName}" TextWrapping="Wrap" FontSize="36" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource PhoneTextLargeStyle}" Foreground="White"/>
                                    </StackPanel>
                                </Border>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                </Grid>
            </controls:PivotItem>
            <!--Pivot item two-->
            <controls:PivotItem Header="scheduled" Foreground="White">
                <ListBox x:Name="lbxScheds" Grid.Row="0" SelectionChanged="lbxScheds_SelectionChanged">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Border Height="135" Width="460">
                                <StackPanel Height="130" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
                                    <TextBlock Foreground="White"  Width="250" x:Name="ActivityTextBlock" Text="{Binding ActName}" TextWrapping="Wrap" FontSize="36" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource PhoneTextLargeStyle}"/>
                                    <TextBlock Foreground="White" Margin="03,10,0,0" Width="100" Text="{Binding SchedType}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"  VerticalAlignment="Top" HorizontalAlignment="Left"/>
                                    <TextBlock Foreground="White" Margin="03,10,0,0" Width="100" Text="{Binding SchedCreatedTime}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}"  VerticalAlignment="Top" HorizontalAlignment="Left"/>
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
        </controls:Pivot>
        <StackPanel Margin="0,0,0,0" Grid.Row="1">
            <my:AdControl  Margin="0,5,0,0" Height="80" HorizontalAlignment="Center" x:Name="adControl3" VerticalAlignment="Top" Width="480" ApplicationId="c8736437-6eec-403e-b9d4-333c4e6794d1" AdUnitId="28360" IsAutoRefreshEnabled="True"  BorderBrush="Transparent"/>
        </StackPanel>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.new.rest.png" Text="new" Click="AppBarNew_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>